﻿<%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="WebApplication6._Default" %>

<asp:Content ID="BodyContent" ContentPlaceHolderID="MainContent" runat="server">
    
    <style >
        th{
            text-align :center ;
            width :150px;
            line-height :30px;
        }
        td{
            text-align :center ;
        }
    </style>
    <br />
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns ="False" OnRowEditing ="GridView1_RowEditing" OnRowUpdating ="GridView1_RowUpdating" OnRowDeleting ="GridView1_RowDeleting" OnRowCancelingEdit ="GridView1_RowCancelingEdit" BackColor="#DEBA84" BorderColor="#DEBA84" BorderStyle="None" BorderWidth="1px" CellPadding="3" CellSpacing="2" >
        <Columns>
            <asp:BoundField DataField="Id" HeaderText="Id"/>
            <asp:BoundField DataField="HobName" HeaderText="姓名"  />
            <asp:BoundField DataField="HobSex" HeaderText="性别" />
            <asp:BoundField DataField="HobAge" HeaderText="年龄" />
            <asp:BoundField DataField="Hobby" HeaderText="爱好"/>
            <asp:BoundField DataField="Remarks" HeaderText="备注" />

            <asp:CommandField ShowDeleteButton ="true" ShowEditButton ="true" ShowHeader ="true" HeaderText ="操作" />
        </Columns>

        <%--背影颜色--%>
        <FooterStyle BackColor="#ff99cc"  ForeColor="#33ccff"  />
        <HeaderStyle BackColor="#A55129" Font-Bold="True" ForeColor="White" />
        <PagerStyle ForeColor="#8C4510" HorizontalAlign="Center" />
        <RowStyle BackColor="#FFF7E7" ForeColor="#8C4510" />
        <SelectedRowStyle BackColor="#339933" Font-Bold="True" ForeColor="White" />
        <SortedAscendingCellStyle BackColor="#FFF1D4" />
        <SortedAscendingHeaderStyle BackColor="#B95C30" />
        <SortedDescendingCellStyle BackColor="#F1E5CE" />
        <SortedDescendingHeaderStyle BackColor="#93451F" />

    </asp:GridView>
    <br />
    <asp:Button runat ="server" ID ="你是憨货" Text ="添加" OnClick="你是憨货_Click" />

    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:Bank22ConnectionString %>" SelectCommand="SELECT * FROM [Hobbies]"></asp:SqlDataSource>

</asp:Content>
